package com.lb.uts.entity;

import com.lb.uts.constants.UTSConstants;

import java.util.Date;

/**
 * 等待执行的job信息
 * @author liangb
 */
public class WaitJob {

    private String jobId;

    /*
    依赖关系
     */
    private String jobName;

    private String jobGroup;
    /*
    创建时间
     */
    private Date addTime = new Date();
    private String host;

    /*
    执行任务的id
     */
    private String recordId;

    private String systemName;

    public String getSystemName() {
        return systemName;
    }

    public void setSystemName(String systemName) {
        this.systemName = systemName;
    }

    /*
        判断时间是否超时
         */
    public boolean isTimeOut() {
        Date endTime = new Date();
        return endTime.getTime() - addTime.getTime() > UTSConstants.TIME_OUT;
    }

    public String getJobId() {
        return jobId;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public void setJobId(String jobId) {
        this.jobId = jobId;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getJobGroup() {
        return jobGroup;
    }

    public void setJobGroup(String jobGroup) {
        this.jobGroup = jobGroup;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public String getRecordId() {
        return recordId;
    }

    public void setRecordId(String recordId) {
        this.recordId = recordId;
    }
}
